// components/rate-view.js
Component({

  properties: {
    rateValue: {
      type: Number,
      value: 3
    }
  },
  data: {
    rateList: []
  },
  ready() {
    let rateList = []
    for (let i = 0; i < 5; i++) {
      if (i < this.data.rateValue) {
        rateList.push(1)
      } else {
        rateList.push(0)
      }
    }
    this.setData({
      rateList
    })
    // console.log("rateList", this.data.rateList)
  },
  methods: {

  }
})